<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>顾客请假申请</title>
	 <%include("/common/include.html"){}%>
	 <link rel="stylesheet" type="text/css" href="${cxt!}/sb/css/bootstrap.css">
</head>
<body>
<!-- 	<div class="easyui-layout" style="width:80%;height:100%;"> -->
		<form id="leave" method="post">
			<div data-options="region:'center'"  style="text-align: center;">
				<div style="display: inline-block;margin:0 auto;" >
					<input type="hidden" id="ids" name="customer.ids" value="${customer.ids !}"/>
					<input id="name" name="customer.name"  value="${customer.name !}" type="hidden" >
					<input id="photo" name="customer.phone"  value="${customer.phone !}" type="hidden" >
					<input id="hybh" name="customer.hybh"  value="${customer.hybh !}" type="hidden" >
<!-- 					<div class="easyui-panel" title="顾客信息" style="width:700px;height:110px;margin:0 auto;margin-bottom: -1px;"> -->
<!-- 						<div class="charge" style="text-align: center;"> -->
<!-- 							<ul class="headContent" style="margin-left:0%"> -->
<!-- 								<li style="margin-top: 14px;margin-left:10px;"> -->
<!-- 										<span>姓名</span>  -->
<!-- 										<input id="name" name="customer.name" class="easyui-textbox" style="width:120px;" value="${customer.name !}" data-options="readonly:true"> -->
<!-- 								</li> -->
<!-- 								<li style="margin-left: 10px;"> -->
<!-- 										<span>手机号</span> -->
<!-- 										<input id="photo" name="customer.phone" class="easyui-textbox" style="width:120px;" value="${customer.phone !}" data-options="readonly:true"> -->
<!-- 								</li> -->
<!-- 								<li style="margin-left: 10px;"> -->
<!-- 										<span>会员编号</span> -->
<!-- 									    <input id="hybh" name="customer.hybh" class="easyui-textbox" style="width:120px;" value="${customer.hybh !}" data-options="readonly:true"> -->
<!-- 								</li> -->
<!-- 							</ul> -->
<!-- 						</div> -->
<!-- 					</div> -->
					<div class="easyui-panel" title="请假内容" style="width:700px;padding:10px;" align="center">
						<%include("/leaveApplication/leaveItem.html"){}%> 
						
					</div>
						
				</div>
			</div>
			<div data-options="region:'center'"  style="overflow-x:hidden;">				
				
			</div>
		</form>
<!-- 	</div> -->
	<script>
	//获取顾客信息
// 	function searchCus()
// 	{	
// 		var reData=getCusInfo();
// 		if(reData.msg==200)
// 		{
// 			initTargetSumTable();
// 		}
		
// 	}
	</script>
	<script>
		//保存请假顾客
		function save(){
			if($("#customerName").val() != "" && $("#customerPhone").val() != "" && $("#customerHybh").val() != ""){
				if($("#cusName").val() != "" && $("#date").val() != "" && $("#cause").val() != "" && $("#class").val() != ""){
					if($("#startDate").val()<=$("#endDate").val()){
						$.ajax({
			                cache: true,
			                type: "POST",
			                url:"${cxt !}/leaveApplication/saveLeave",
			                data:$('#leave').serialize(),// 你的formid
			                dataType:'json',
			                async: false,
			                success: function(result) {		                	
			                	if(result.msg == "200")
			                	{	
			                		$.slideMsg("保存成功", parent.$);
// 			                		$.messager.alert('请假','保存成功','success');
			            			location.reload();
			                	}else{		                		
			        					 $.alert(parent.$,result.msg);
			                	}
			                }
			            });
					}else{
						$.alert(parent.$,"开始时间不能小于结束时间，请正确填写");
					}
				}else{ 
					$.alert(parent.$,"请假信息填写不完整，请完善信息");
					
				} 
			}else{
				$.alert(parent.$,"请先搜索顾客信息");
			}
		}
	</script>
</body>
</html>